//
// C++ Interface: tab
//
// Description: 
//
//
// Author: Os3 s.r.l. <xgui@os3.it>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//

namespace xgui
{
    %feature("docstring","derives from :class:`xgui.ContainerClass` ") TabClass;
	struct TabClass : public xgui::ContainerClass
	{
		TabClass();
		std::string const &className();
		bool isInstanceable();
		xgui::Object * create(xgui::Object * parent, xgui::StringMap &properties);

		virtual bool canContain(xgui::ClassInfo * c);
	};
	
    %feature("docstring","derives from :class:`xgui.Container` \n\n**PROPERTIES**\n\n* **page-count** *(RO):* retrieves the number of pages that the tab widgets currently holds\n\n* **selected-page** *(RW):* sets or retrieves the id of the currently selected page of the tab.\n\n* **selected-index** *(RW):* sets or retrieves the zero-based index of the currently selected page of the tab.\n\n**EVENTS**\n\n* **onselect** *(linked to* :class:`xgui.TextCallback` *):* fired when the currently selected tab page changes. the string parameter passed to the callback function is the id of the new selected page. The status parameter is the index of the new selected page.\n\n**PUSHED PROPERTIES (properties registered on all children)**\n\n* **tab-icon** *(RW):* sets or retrieves the path of the file containing the icon displayed near the label text of the tab page containing this child.\n\n* **tab-label** *(RW):* sets or retrieves the label text of the tab page containing this child.\n\n**METHODS**\n\n") Tab;
	class Tab : public xgui::Container
	{
		protected:
			Tab(xgui::Container * parent, const std::string & alignment);
			virtual ~Tab();

		public:
		    %feature("docstring","sets the image displayed on the specified tab page near the label text\n\n*C++*::\n\n void setPageIcon(xgui::Widget *, xgui::Image * icon);\n\n") setPageIcon;
			void setPageIcon(xgui::Widget *, xgui::Image * icon);
			%feature("docstring","sets the text displayed on the label for the specified tab page.\n\n*C++*::\n\n void setPageLabel(xgui::Widget *, std::string const &str);\n\n") setPageLabel;
			void setPageLabel(xgui::Widget *, std::string const &str);

            %feature("docstring","returns the icon displayed on the specified tab page near the label text\n\n*C++*::\n\n xgui::Image * getPageIcon(xgui::Widget * w);\n\n") getPageIcon;
			xgui::Image * getPageIcon(xgui::Widget * w);
			%feature("docstring","returns the label text of the specified tab page\n\n*C++*::\n\n std::string const &getPageLabel(xgui::Widget * w);\n\n") getPageLabel;
			std::string const &getPageLabel(xgui::Widget * w);
	};
}

%extend xgui::Tab {
	%pythoncode {
		def __del__(self):
			if self.valid: self.delPyOwner(self)
	}
}
